# -*- coding: utf-8 -*-
class instrument():
    def make_sound(self):
        pass
class Erhu(instrument):
    def make_sound(self):
        print('二胡弹奏')
class Piano(instrument):
    def make_sound(self):
        print('钢琴')
class Violin(instrument):
    def make_sound(self):
        print('小提琴弹奏')
    #编写一个函数--->多态
def play(obj):
    obj.make_sound()

er=Erhu()
piano = Piano()
vio=Violin()
#调用方法   --->方法重写
play(er)
play(piano)
play(vio)